import request from '@/utils/request'

// 查询课程试卷列表
export function listPaper(query) {
  return request({
    url: '/coursePaper/list',
    method: 'get',
    params: query
  })
}

// 查询课程试卷详细
export function getPaper(coursePaperId) {
  return request({
    url: '/coursePaper/' + coursePaperId,
    method: 'get'
  })
}

// 新增课程试卷
export function addPaper(data) {
  return request({
    url: '/coursePaper',
    method: 'post',
    data: data
  })
}

// 修改课程试卷
export function updatePaper(data) {
  return request({
    url: '/coursePaper',
    method: 'put',
    data: data
  })
}

// 删除课程试卷
export function delPaper(coursePaperId) {
  return request({
    url: '/coursePaper/' + coursePaperId,
    method: 'delete'
  })
}
